import request from '@/utils/request'
// 查询企业的部门列表
export const companyDepartment = () => {
  return request({
    url: '/company/department'
  })
}

// 获取员工简单列表
export const sysUserSimple = () => {
  return request({
    url: '/sys/user/simple'
  })
}

// 新增部门
export const companyDepartmentPost = (data) => {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

// 根据ID删除部门
export const companyDepartmentDelete = (id) => {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}

// 根据ID修改部门详情
// restful规范   增：post   删:delete   改:put:全量修改/patch:部分修改   查:get
export const companyDepartmentPut = (data) => {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
